@@ -71,6 +71,10 @@ module Agents |
||
| 71 | 71 |
options['template']['title'].presence || "#{name} Event Feed"
|
| 72 | 72 |
end |
| 73 | 73 |
|
| 74 |
+ def feed_link |
|
| 75 |
+ options['template']['link'].presence || "https://#{ENV['DOMAIN']}"
|
|
| 76 |
+ end |
|
| 77 |
+ |
|
| 74 | 78 |
def feed_description |
| 75 | 79 |
options['template']['description'].presence || "A feed of Events received by the '#{name}' Huginn Agent"
|
| 76 | 80 |
end |
@@ -100,6 +104,7 @@ module Agents |
||
| 100 | 104 |
<channel> |
| 101 | 105 |
<title>#{feed_title.encode(:xml => :text)}</title>
|
| 102 | 106 |
<description>#{feed_description.encode(:xml => :text)}</description>
|
| 107 |
+ <link>#{feed_link.encode(:xml => :text)}</link>
|
|
| 103 | 108 |
<lastBuildDate>#{Time.now.rfc2822.to_s.encode(:xml => :text)}</lastBuildDate>
|
| 104 | 109 |
<pubDate>#{Time.now.rfc2822.to_s.encode(:xml => :text)}</pubDate>
|
| 105 | 110 |
<ttl>#{feed_ttl}</ttl>
|
@@ -109,6 +109,7 @@ describe Agents::DataOutputAgent do |
||
| 109 | 109 |
<channel> |
| 110 | 110 |
<title>XKCD comics as a feed</title> |
| 111 | 111 |
<description>This is a feed of recent XKCD comics, generated by Huginn</description> |
| 112 |
+ <link>https://localhost:3000</link> |
|
| 112 | 113 |
<lastBuildDate>#{Time.now.rfc2822}</lastBuildDate>
|
| 113 | 114 |
<pubDate>#{Time.now.rfc2822}</pubDate>
|
| 114 | 115 |
<ttl>60</ttl> |